CAN support

The 6.14 version of the SIL (Software-in-the-Loop) simulator introduces the implementation of logic for CAN protocol management and simulation through SIL.

  • The CAN inputs and outputs of the SIL block are structured according to the CAN Message format established by Simulink. This uniformity ensures compatibility, allowing for the use of either Simulink's native CAN blocks or third-party developed blocks within the simulation environment.

  • It is possible to implement a CAN connection without using the Simulink CAN blocks, for example by directly connecting the CAN-A output to the CAN-B input within the SIL block. However, to ensure correct operation in this configuration, the insertion of a delay in the signal path using the Delay block is mandatory.

  • The Simulink CAN Transmit block continuously sends the message present at the input, a behavior that diverges from reality, where CAN messages are typically transmitted on event.

Note

To align the simulation with real-world behavior, two solutions exist: the block can be configured so that transmission occurs only when a change in data occurs, or the block itself can be disabled in Simulink, managing the transmission via the timestamp

  • The CAN messages exiting the SIL block are completed with the timestamp. This data is crucial: it allows the SIL block to unequivocally distinguish a new message and also serves as a mechanism to controllably enable or disable the CAN Transmit block, thereby solving the problem of continuous transmission.

  • To ensure the correct operation of the simulated CAN system, it is essential to adequately configure the receiving mailboxes. The simulation rigorously takes into account both the filters set and the number of mailboxes specifically assigned to each ID.


© 2026 Embention. All rights reserved.